﻿/*****
 *  Copyright 2011, Kaven Gagné
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

using System;
using Knowledge.DataModel;
using System.Collections.ObjectModel;

namespace Knowledge
{
    public class FileViewModel : ViewModelBase
    {
        #region Constructors
        public FileViewModel(kFile file, ArticleViewModel parent)
            : base(parent, false)
        {
            _file = file;
        } 
        #endregion //Constructors

        #region Data
        private kFile _file;
        #endregion //Data

        #region Presentation Members

        #region FileID
        public int FileID
        {
            get
            {
                return _file.FileID;
            }
            set
            {
                _file.FileID = value;
                this.OnPropertyChanged("FileID");
            }
        }
        #endregion //FileID
        
        #region FileName
        public String FileName
        {
            get
            {
                return _file.FileName;
            }
            set
            {
                _file.FileName = value;
                this.OnPropertyChanged("FileName");
            }
        }
        #endregion //FileName

        #endregion //Presentation Members

        #region Overrides
        protected override void LoadChildren()
        {
        } 
        #endregion //Overrides
    }


    #region Design-Time Data Samples Support
    public class FileViewModels : ObservableCollection<FileViewModel> { }
    #endregion //Design-Time Data Samples Support
}
